﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace while循环
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //编程题：3n+1问题，n为奇数，变为3n+1，否则变为n的一半。最终n会变为1.
     int n =Convert.ToInt32(Console.ReadLine());
            int count = 0;
            while (n !=1)
            {
                if (n % 2 == 0)
                {
                    n = n / 2;
                    count++;
                }
                else if (n % 2 == 1)
                {
                    n = 3 * n + 1;
                    count++;
                }

            }
            Console.WriteLine(count);
            //int i = 1;
            //int a = i++;
            //Console.WriteLine(a);
            //Console.WriteLine(i);///////////a是1，i是2
        }
    }
}
